# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-other
pkgname=skladnik
pkgver=0.5.0
pkgrel=0
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://apps.kde.org/skladnik"
pkgdesc="An implementation of the Japanese warehouse keeper game 'sokoba'"
license="BSD-3-Clause AND GPL-2.0-or-later AND CC0-1.0"
makedepends="
	extra-cmake-modules
	kconfig5-dev
	kconfigwidgets5-dev
	kcoreaddons5-dev
	kdoctools5-dev
	ki18n5-dev
	kio5-dev
	kwidgetsaddons5-dev
	kxmlgui5-dev
	libkdegames-dev
	qt5-qtbase-dev
	samurai
	"
subpackages="$pkgname-doc $pkgname-lang"
_repo_url="https://invent.kde.org/games/skladnik.git"
source="https://download.kde.org/stable/skladnik/$pkgver/src/skladnik-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
43cbd3545ca2b83b7c91a47c9ad8d2534fc285345859a1af315cc15fa19239e879831174edfb975f4b1424d61399e097b7578987e75aa462704d7d6bed7fd817  skladnik-0.5.0.tar.xz
"
